<include file="../header" />
<body class="J_scroll_fixed">
    <script>

        $(document).ready(function() {

            $('button.bankInfo').click(function () {

                var id = $(this).attr("id");
                layer.open({

                    type: 2,
                    title: '提现账户查看',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['500px', '48%'],
                    content: "{:U('withdraw/viewMasterBank')}&id="+id

                });
            });
        });

    </script>
<form class="well form-search" method="post" style="float:left" action="{:U('withdraw/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
                    时间段：
            <input type="text" name="startTime" class="input length_2 J_date" value="{$startTime}" style="width:120px;" autocomplete="off">-<input autocomplete="off" type="text" class="input length_2 J_date" name="endTime" value="{$endTime}" style="width:120px;">
                           <br><br>用户名：
            <input type="text" class="input length_2" name="name" style="width:200px;" value="{$name}" placeholder="请输入用户名...">
            &nbsp;&nbsp;&nbsp;&nbsp;状态：{:getEnumSelectWidget($statusEnum, 'status', $status, 1)}
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn" href="{:U('withdraw/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>编号</th>
            <th>创建时间</th>
            <th>用户名</th>
            <th>金额</th>
            <th>提现方式</th>
            <th>提现账户</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.withdraw_id}</td>
                <td>{$vo.create_time}</td>
                <td>{$vo.user_name}</td>
                <td>{$vo.money}</td>
                <td>{:getEnumString($typeEnum, $vo['withdraw_type'])}</td>
                <td>
            <if condition="$vo['withdraw_type'] eq $typeEnum['WECHAT']">
                {$vo.wechat_account}
            <elseif condition="$vo['withdraw_type'] eq $typeEnum['ALIPAY']"/>
                {$vo.alipay_account}
            <elseif condition="$vo['withdraw_type'] eq $typeEnum['BANK']"/>
                {$vo.bank_account}
            </if>
                </td>
                <td>{:getEnumString($statusEnum, $vo['status'])}</td>
                <td>
                    <if condition = "$vo['status'] eq $statusEnum['WAITING']">
                        <a href='{:U("withdraw/endWithdraw",array("id"=>$vo["withdraw_id"]))}'>处理完成</a>
                    </if>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>